package com.java1234.jxc.beans;

import com.java1234.jxc.core.base.BaseModel;
import org.nutz.dao.entity.annotation.*;

@Table("t_goods")
public class Goods extends BaseModel{

    @Column
    @Comment("编号")
    @Id
    private Integer id;

    @Column
    @Comment("商品编码")
    private String code; //
    @Column
    @Comment("商品名称")
    private String name; //

    @Column
    @Comment("商品型号")
    private String model; //
    @Column("type_id")
    @Comment("商品类别ID")
    private Integer typeId;  //

    @One(field = "typeId")
    private GoodsType goodsType;

    @Column
    @Comment("商品单位")
    private String unit; //

    @Column("last_purchasing_price")
    @Comment("上次采购价格")
    private float lastPurchasingPrice; //

    @Column("purchasing_price")
    @Comment("采购价格  成本价  假如价格变动 算平均值")
    private float purchasingPrice; //

    @Column("selling_price")
    @Comment("出售价格")
    private float sellingPrice; //

    @Column("inventory_quantity")
    @Comment("库存数量")
    private int inventoryQuantity; //

    @Column("min_num")
    @Comment("库存下限")
    private int minNum; //
    @Column
    @Comment("0 初始化状态 1 期初库存入仓库  2  有进货或者销售单据")
    private int state; //
    @Column
    @Comment("生产厂商")
    private String producer; //
    @Column
    @Comment("备注")
    private String remarks; //


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public GoodsType getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(GoodsType goodsType) {
        this.goodsType = goodsType;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public float getLastPurchasingPrice() {
        return lastPurchasingPrice;
    }

    public void setLastPurchasingPrice(float lastPurchasingPrice) {
        this.lastPurchasingPrice = lastPurchasingPrice;
    }

    public float getPurchasingPrice() {
        return purchasingPrice;
    }

    public void setPurchasingPrice(float purchasingPrice) {
        this.purchasingPrice = purchasingPrice;
    }

    public float getSellingPrice() {
        return sellingPrice;
    }

    public void setSellingPrice(float sellingPrice) {
        this.sellingPrice = sellingPrice;
    }

    public int getInventoryQuantity() {
        return inventoryQuantity;
    }

    public void setInventoryQuantity(int inventoryQuantity) {
        this.inventoryQuantity = inventoryQuantity;
    }

    public int getMinNum() {
        return minNum;
    }

    public void setMinNum(int minNum) {
        this.minNum = minNum;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getProducer() {
        return producer;
    }

    public void setProducer(String producer) {
        this.producer = producer;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
